﻿using Engine;
using Engine.Graphics;
using Engine.Input;
using Engine.Media;
using GameEntitySystem;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;

namespace Game
{
    /// <summary>
    /// 新的滚动界面
    /// </summary>
    public class CommandScrollPanelWidget : ScrollPanelWidget
    {
        public override float CalculateScrollAreaLength()
        {
            float length = 0f;
            foreach (Widget child in Children)
            {
                if (child.IsVisible)
                {
                    length = MathUtils.Max(length, child.ParentDesiredSize.X + 2f * child.Margin.X - 600f);
                }
            }
            return length;
        }
    }
}